//
//  HMHomeBtn.m
//  OC新浪微博
//
//  Created by wyman on 16/4/13.
//  Copyright © 2016年 wyman. All rights reserved.
//

#import "HMHomeBtn.h"

@implementation HMHomeBtn

+(instancetype)setTitleBtn:(NSString *)title
{
    HMHomeBtn *titleBtn = [[self alloc]init];
    titleBtn.frame = CGRectZero;
    [titleBtn setTitle:title forState:UIControlStateNormal];
    [titleBtn setImage:[UIImage imageNamed:@"navigationbar_arrow_down"] forState:UIControlStateNormal ];
//    [titleBtn setImage:[UIImage imageNamed:@"navigationbar_arrow_up"] forState:UIControlStateHighlighted ];
    [titleBtn setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];
    titleBtn.titleLabel.font = [UIFont systemFontOfSize:18];
    [titleBtn sizeToFit];
    
  
    
    return titleBtn;
}


-(void)layoutSubviews
{
    [super layoutSubviews];
    self.titleLabel.frame = CGRectMake(0, 0, self.titleLabel.frame.size.width, self.titleLabel.frame.size.height);
    
    self.imageView.frame = CGRectMake(self.titleLabel.frame.size.width+8, 8, self.imageView.frame.size.width, self.imageView.frame.size.height);

}
@end
